
// Copyright (C) Recursion Company. All rights reserved.

#ifndef __VOL_SERVICE_H__
#define __VOL_SERVICE_H__

#include <WinSvc.h>

class CVolService : public CVolCommonBase
{
public:
    static void sInitMembers ();
    static void sInitMembers (CVolRuntimeClass* pUserServiceProcessor);

    static void sSetServiceStatus (DWORD dwStatus);
    static BOOL sLogEvent (const TCHAR* szServiceName, const TCHAR* szEventMessage, WORD wEventType, WORD wEventCategory, DWORD dwEventID);
    static BOOL sIsServiceInstalled (const TCHAR* szServiceName);
    static BOOL sInstallService (const TCHAR* szServiceName, const TCHAR* szServiceDisplayName, const TCHAR* szServiceDesc, const TCHAR* szServiceFileName, BOOL blAutoStart, const TCHAR* szServiceStartupParam);
    static BOOL sUninstallService (const TCHAR* szServiceName);
    static BOOL sStartService (const TCHAR* szServiceName, const CMStringArray* psaryArgs);
    static BOOL sStopService (const TCHAR* szServiceName);
    static BOOL sPauseService (const TCHAR* szServiceName, BOOL blPause);
    static INT sGetServiceStatus (const TCHAR* szServiceName);
    static LPQUERY_SERVICE_CONFIG sGetServiceConfig (const TCHAR* szServiceName, CVolMem& memBuf);

public:
    static CVolRuntimeClass* ms_pUserServiceProcessor;
    static SERVICE_STATUS_HANDLE ms_hServiceStatusHandle;
    static DWORD ms_dwLastStatus;
};

#endif
